﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////


#pragma once

#include "IGraphicsGisLayer.h"
#include "GcmpModelInterface.h"

namespace gcmp
{
    class GCMP_MODEL_INTERFACE_EXPORT IGisMap
    {
    public:
        /// \brief 析构函数
        virtual ~IGisMap();

        /// \brief   判断 pLayer指向的数据是否有效
        /// \param[in]    const IGisLayer* pLayer
        /// \return       bool
        virtual bool IsVaildLayer(const IGisLayer* pLayer) =0;

        /// \brief  获取图层索序号
        /// \param  layerName  图层名称
        /// \return 获取成功返回索引，否则返回-1
        virtual int GetLayerIndex(const std::wstring& sName) const = 0;

        /// \brief  移动图层索序号
        /// \param  layerName  图层名称
        /// \param  newIndex    图层新的索引号
        /// \return 移动成功返回true，否则返回false
        /// \remark 图层顺序默认是按照加载排序的：最先加载的索引为0在最上层，后面加载的依次往下；通过该接口可以调整图层顺序
        virtual bool MoveLayer(const std::wstring& layerName, unsigned int newIndex) = 0;

    };
}

